package store;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

public final class RecypherDatabase
{

	private static Connection con;
	private static Statement st;
	private static String url = "jdbc:mysql://localhost:3306/mysql";
	
	public static void createConnection(String user, String pwd) throws
														ClassNotFoundException,
														SQLException
	{
		Class.forName("com.mysql.jdbc.Driver");
		con = DriverManager.getConnection(url, user, pwd);
	}
	
	public static void closeConnection() throws
									SQLException
	{
		con.close();
	}
	
	public static void createDatabase(String dbName) throws
											SQLException
	{
		st = con.createStatement();
		st.executeUpdate("CREATE DATABASE "+dbName);
	}
}
